import {
	defineConfig
} from "vite";
import {
	resolve
} from "path";
import uni from "@dcloudio/vite-plugin-uni";

export default defineConfig({
	plugins: [
		uni(),
	],
	resolve: {
		alias: {
			"@": resolve(__dirname, "src"),
			"@a": resolve(__dirname, "src/api"),
			"@u": resolve(__dirname, "src/utils"),
		},
	},
	server: {
		port: '5174',
		proxy: {
			"/prod-api": {
				target: "http://121.37.209.201:8413", //后台地址
				changeOrigin: true,
				rewrite: (path) => path.replace(/^\/prod-api/, ""),
			}
		},
	},
});